package com.sa.commons.web.mvc.exception;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.handler.SimpleMappingExceptionResolver;

public class ExceptionResolverWithLog extends SimpleMappingExceptionResolver{
	private static Log log = LogFactory.getLog(ExceptionResolverWithLog.class);
	@Override
	public ModelAndView resolveException(HttpServletRequest request,
			HttpServletResponse response, Object handler, Exception ex) {
		log.error("error", ex);
		return super.resolveException(request, response, handler, ex);
	}
}
